1
'***************************** Module Header ******************************\
2 '* Module Name: SilverlightClient.aspx.vb
3 '* Project: AzureBingMaps
4 '* Copyright (c) Microsoft Corporation.
6 '* The code behind for the aspx page hosting the Silverlight client.
8 '* This source is subject to the Microsoft Public License.
9 '* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
10 '* All other rights reserved.
12 '* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
13 '* EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
14 '* WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
15 '\**************************************************************************
18 Partial
Public Class SilverlightClient
19 Inherits System
.Web
.UI
.Page
20 ' Those properties will be passed to Silverlight as initial parameters.
21 Public Property IsAuthenticated
As Boolean
22 Public Property WelcomeMessage
As String
24 Protected
Sub Page_Load(ByVal sender
As Object, ByVal e
As EventArgs
)
25 ' Query session data to see if the user has been authenticated.
26 If Session("User") IsNot
Nothing Then
27 Me.IsAuthenticated
= True
28 Me.WelcomeMessage
= "Welcome: " & DirectCast(Session("User"), String) & "."
30 Me.IsAuthenticated
= False
31 Me.WelcomeMessage
= Nothing